home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
ctoolwrk.lbr
/
GLOBAL.C
< prev
next >
Wrap
Text File
|
1985-09-27
|
512b
|
32 lines
/* This is Global.c from page 56 */
/* x is defined as a global variable */
#include a:printf.c
int x;
main()
{
x = 1;
printf("x = %d\n",x);
func1();
printf("x = %d\n",x);
func2();
printf("x = %d\n",x);
func3();
printf("x = %d\n",x);
}
func1() /* multiply x by 1 */
{
x = x * 1;
}
func2() /* multiply x by 2 */
{
x = x * 2;
}
func3() /* multiply x by 3 */
{
x = x * 3;
}